<!DOCTYPE html>
<html>
    <head>
        <script src="js/vue.js"></script>
        <style>
            .fade-enter, .fade-leave-to { opacity: 0;}
            .fade-enter-active, .fade-leave-active { transform: opacity 1.5s; }
        </style>
    </head>
    <body>
        <div id="app">
            <transition name="fade" >
            <button :key="isOff" @click="isOff = !isOff">
                {{isOff?'Off':'On'}}
            </button>
        </transition>
        </div>
        <script>
            var vm = new Vue({
                el:'#app',
                data : { isOff : false}
            });
        </script>
    </body>
</html>